#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int n = 0;
    int sum = 0;

    while (scanf("%d", &n) != EOF)
    {
        int m = 2;
        for (int i = 0; i < n; i++)
        {
            sum = sum + m;
            m = m + 3;
        }
        printf("%d\n", sum);
    }
    return 0;
}